<template>
  <div id="goTop">
    <div class="topping" v-show="goTopShow" @click="goTop">返回顶部</div>
  </div>
</template>

<script>
export default {
  name: 'goTop',
  data() {
    return {
      scrollTop: '',
      goTopShow: true
    }
  },
  watch: {},
  methods: {
    goTop() {
      document.body.scrollTop = document.documentElement.scrollTop = 0
    }
  }
}
</script>

<style scoped>
.topping {
  width: 100%;
  height: 96px;
  background: #ffffff;
  font-size: 32px;
  color: #000000;
  line-height: 96px;
  text-align: center;
  position: fixed;
  bottom: 0;
}
</style>
